Skip to content

[stable32] test(validation): unmount wrappers to fix pending fetch errors#7103

Merged
vitormattos merged 1 commit intostable32from
backport/7020/stable32
Mar 5, 2026
Merged

[stable32] test(validation): unmount wrappers to fix pending fetch errors#7103
vitormattos merged 1 commit intostable32from
backport/7020/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #7020

Vitest was reporting 13 unhandled rejections with
'Closing rpc while fetch was pending' in Validation.spec.ts.

Root cause: Vue instances were never unmounted between tests,
so their beforeUnmount hooks never ran — isActiveView stayed
true and background microtasks (validate, refreshAfterAsyncSigning)
kept firing after the worker started winding down.

Fixes:
- Add outer afterEach(() => wrapper.unmount()) for the main wrapper
- Track local wrappers in the created() describe at scope level
  and unmount them in afterEach
- Unmount the inline localWrapper in the handleValidationSuccess
  describe immediately after use

Signed-off-by: Vitor Mattos <[email protected]>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Mar 5, 2026
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Mar 5, 2026
@vitormattos vitormattos merged commit cf531fc into stable32 Mar 5, 2026
35 checks passed
@vitormattos vitormattos deleted the backport/7020/stable32 branch March 5, 2026 13:20
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant